﻿#include "Frm01.h"

Frm01::Frm01(HmiApp* app, STTWidget *par, const string& id, const string& desc) : STTPage(app->getRuntime(), par, id, desc) {
	hmiApp = app;
}

Frm01::~Frm01() {
}

void Frm01::onInit(){
}

void Frm01::createParts() {
	setMainArg(0, 0, 1024, 600);
	setMainStyle(0, 0xffffff, 0xffffff, 0, 255, 0, 0xc0c0c0);

	/*----------------------------- Label : wMLabel7                     -----------------------------*/
	wMLabel7 = new STTLabel(p_rt, this, "wMLabel7");
	wMLabel7->setMainArg(280, 233, 464, 134, "鑫通态APUS IDE示例程序", TextAlign::CENTER, LabelLongMode::CLIP, 30);
	wMLabel7->setFonts(0x0, 16, "文泉驿微米黑", 0);
	wMLabel7->setMainStyle(0, 0xffffff, 0xffffff, GradDir::NONE, 0, 0x0, 0);
	wMLabel7->setFormatText(TextAlign::CENTER, LabelLongMode::CLIP, 30);

	/*----------------------------- Label : wMLabel8                     -----------------------------*/
	wMLabel8 = new STTLabel(p_rt, this, "wMLabel8");
	wMLabel8->setMainArg(47, 366, 930, 134, "#ff0000 MSSQL SERVER##0000ff 增删改查#演示", TextAlign::CENTER, LabelLongMode::CLIP, 30);
	wMLabel8->setFonts(0x0, 16, "文泉驿微米黑", 0);
	wMLabel8->setMainStyle(0, 0xffffff, 0xffffff, GradDir::NONE, 0, 0x0, 0);
	wMLabel8->setFormatText(TextAlign::CENTER, LabelLongMode::CLIP, 30);

	/*----------------------------- Label : wMLabel9                     -----------------------------*/
	wMLabel9 = new STTLabel(p_rt, this, "wMLabel9");
	wMLabel9->setMainArg(323, 513, 378, 88, "", TextAlign::CENTER, LabelLongMode::CLIP, 30);
	wMLabel9->setFonts(0x0, 16, "文泉驿微米黑", 0);
	wMLabel9->setMainStyle(0, 0xffffff, 0xffffff, GradDir::NONE, 0, 0x0, 0);
	wMLabel9->setFormatDate("-", ":", true, true, true, true, true, true, true);
	wMLabel9->bindData(_V("$time"));

	/*----------------------------- Button : wMButton1                   -----------------------------*/
	wMButton1 = new STTButton(p_rt, this, "wMButton1", 0);
	wMButton1->setMainArg(13, 1, 98, 48, false);
	wMButton1->setPressedArg("增删改查", 0x0, "文泉驿微米黑", 16, 0);
	wMButton1->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton1->setReleasedArg("增删改查", 0x0, "文泉驿微米黑", 12, 0);
	wMButton1->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton1->bindOpenFormHandler(Event::CLICKED, "Frm02", PageMode::NEWWIN, NULL);

	/*called after widget created.*/

	return; //createParts END
}

void Frm01::onLoad(){
	wMLabel8->setRecolor(true);
}

bool Frm01::onClosing(){
	return true;
}

void Frm01::onDispose(){
}
